# @Author   : 懒羊羊
# @File     : bubble_sort.py
# @Time     : 2024/11/26 10:30

mylist = [12, 6, 98, 56, 19, 3]

for k in range(0, len(mylist) - 1):
    for i in range(0, len(mylist) - 1 - k):
        if mylist[i] > mylist[i+1]:
            mylist[i], mylist[i+1] = mylist[i+1], mylist[i]
    print(mylist)

